function H = butterWorthFilter(fftStruct, cutoffFreq, n)

% H: Filter transfer function
% n: butterworth order

[H r c] = initFilterSize(fftStruct.fftImage);

%Cut off Frequency
Do = cutoffFreq; 

for i = 1 : size(H,1)
    for j = 1 : size(H,2)
        dist = sqrt((i - (r/2))^2 + (j - (c/2))^2);
        H(i,j) = 1 / (1 + (dist/Do)^(2*n));
    end
end
end